package com.yongninger.adapter;

import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yongninger.activity.R;

public class ShipsmentsListViewAdapter extends ListViewAdapter {
	public ShipsmentsListViewAdapter(Context context,
			List<HashMap<String, Object>> items) {
		super(context, items);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		if (view == null) {
			view = inflater.inflate(R.layout.ships_item, null);
		}
		TextView sproductname = (TextView) view.findViewById(R.id.sproductname);
		sproductname.setText(items.get(position).get("sproductname").toString());
		TextView sproductsum1 = (TextView) view.findViewById(R.id.sproductsum1);
		sproductsum1.setText(items.get(position).get("sproductsum1").toString());
		TextView sproductsum2 = (TextView) view.findViewById(R.id.sproductsum2);
		sproductsum2.setText(items.get(position).get("sproductsum2").toString());
		TextView sproductprice = (TextView) view.findViewById(R.id.sproductprice);
		sproductprice.setText(items.get(position).get("sproductprice").toString());
		TextView sproductcount = (TextView) view.findViewById(R.id.sproductcount);
		sproductcount.setText(items.get(position).get("sproductcount").toString());
		TextView sclerk = (TextView) view.findViewById(R.id.sclerk);
		sclerk.setText(items.get(position).get("sclerk").toString());
		return view;
	}
}
